<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.9.1"/>
<title>knet: E:/knet-git/knet/knet/thread_api.h 源文件</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">knet
   &#160;<span id="projectnumber">1.4.5</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.9.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>首页</span></a></li>
      <li><a href="modules.html"><span>模块</span></a></li>
      <li><a href="annotated.html"><span>结构体</span></a></li>
      <li class="current"><a href="files.html"><span>文件</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="搜索" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>文件列表</span></a></li>
      <li><a href="globals.html"><span>全局定义</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_885cc87fac2d91e269af0a5a959fa5f6.html">E:</a></li><li class="navelem"><a class="el" href="dir_4e74998c9a9305a116abc25fcf9a1edb.html">knet-git</a></li><li class="navelem"><a class="el" href="dir_a1c045b39f32066568ae964b52db514f.html">knet</a></li><li class="navelem"><a class="el" href="dir_f76d03789f0b12416cfffea59e2ed47d.html">knet</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">thread_api.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="a00101.html">浏览该文件的文档.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> * Copyright (c) 2014-2015, dennis wang</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> * All rights reserved.</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> * </span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> * Redistribution and use in source and binary forms, with or without</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> * modification, are permitted provided that the following conditions are met:</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> *     * Redistributions of source code must retain the above copyright</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> *       notice, this list of conditions and the following disclaimer.</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"> *     * Redistributions in binary form must reproduce the above copyright</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"> *       notice, this list of conditions and the following disclaimer in the</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment"> *       documentation and/or other materials provided with the distribution.</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment"> * </span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment"> * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS &quot;AS IS&quot; AND</span></div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment"> * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED</span></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment"> * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE</span></div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment"> * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY</span></div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment"> * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES</span></div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment"> * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;</span></div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="comment"> * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND</span></div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="comment"> * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT</span></div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="comment"> * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS</span></div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="comment"> * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</span></div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;</div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="preprocessor">#ifndef THREAD_API_H</span></div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="preprocessor">#define THREAD_API_H</span></div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;</div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="a00056.html">config.h</a>&quot;</span></div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;<span class="keyword">extern</span> <a class="code" href="a00037.html">kthread_runner_t</a>* <a class="code" href="a00121_gacc8838f250e5f685580a508e93d3f636.html#gacc8838f250e5f685580a508e93d3f636">thread_runner_create</a>(<a class="code" href="a00056_a8741dac4a9f8d97603eb3a30a3473b13.html#a8741dac4a9f8d97603eb3a30a3473b13">knet_thread_func_t</a> func, <span class="keywordtype">void</span>* params);</div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;</div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="a00121_gaa9112d70f3e5a8dcf648ce531332f66a.html#gaa9112d70f3e5a8dcf648ce531332f66a">thread_runner_destroy</a>(<a class="code" href="a00037.html">kthread_runner_t</a>* runner);</div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;</div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="a00121_gae125061eb96b154766c0a414eb74065c.html#gae125061eb96b154766c0a414eb74065c">thread_runner_start</a>(<a class="code" href="a00037.html">kthread_runner_t</a>* runner, <span class="keywordtype">int</span> stack_size);</div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;</div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="a00121_gac8644b2d2ca5580e0cac7378154ae2e0.html#gac8644b2d2ca5580e0cac7378154ae2e0">thread_runner_stop</a>(<a class="code" href="a00037.html">kthread_runner_t</a>* runner);</div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;</div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;<span class="keyword">extern</span> <a class="code" href="a00056_ad0ada5642d10ce71bdd90816182f9b79.html#ad0ada5642d10ce71bdd90816182f9b79">thread_id_t</a> <a class="code" href="a00121_ga1f1e994ba4c42e91e4d4b120aa8eb970.html#ga1f1e994ba4c42e91e4d4b120aa8eb970">thread_runner_get_id</a>(<a class="code" href="a00037.html">kthread_runner_t</a>* runner);</div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;</div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="a00121_ga4328cb11f2446f4da89374a1ae8a2f8e.html#ga4328cb11f2446f4da89374a1ae8a2f8e">thread_runner_start_loop</a>(<a class="code" href="a00037.html">kthread_runner_t</a>* runner, <a class="code" href="a00033.html">kloop_t</a>* loop, <span class="keywordtype">int</span> stack_size);</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;</div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="a00121_ga943c1e0bc78abe3d7faae24ae3670d9a.html#ga943c1e0bc78abe3d7faae24ae3670d9a">thread_runner_start_timer_loop</a>(<a class="code" href="a00037.html">kthread_runner_t</a>* runner, <a class="code" href="a00025.html">ktimer_loop_t</a>* timer_loop, <span class="keywordtype">int</span> stack_size);</div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;</div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="a00121_ga80fabbe64d1fc33e81053e51f69772d2.html#ga80fabbe64d1fc33e81053e51f69772d2">thread_runner_start_multi_loop_varg</a>(<a class="code" href="a00037.html">kthread_runner_t</a>* runner, <span class="keywordtype">int</span> stack_size, <span class="keyword">const</span> <span class="keywordtype">char</span>* format, ...);</div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;</div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="a00121_gad9d9269c695d6bd683c856479d525eb7.html#gad9d9269c695d6bd683c856479d525eb7">thread_runner_join</a>(<a class="code" href="a00037.html">kthread_runner_t</a>* runner);</div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;</div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="a00121_ga3a56e5d1203f6697a6579202919aa048.html#ga3a56e5d1203f6697a6579202919aa048">thread_runner_check_start</a>(<a class="code" href="a00037.html">kthread_runner_t</a>* runner);</div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;</div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">void</span>* <a class="code" href="a00121_ga2126b5da850ec506d0909eb81f9a50dc.html#ga2126b5da850ec506d0909eb81f9a50dc">thread_runner_get_params</a>(<a class="code" href="a00037.html">kthread_runner_t</a>* runner);</div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;</div>
<div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;<span class="keyword">extern</span> <a class="code" href="a00056_ad0ada5642d10ce71bdd90816182f9b79.html#ad0ada5642d10ce71bdd90816182f9b79">thread_id_t</a> <a class="code" href="a00121_gaecf10907eee00ec0e807271c906a6645.html#gaecf10907eee00ec0e807271c906a6645">thread_get_self_id</a>();</div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;</div>
<div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="a00121_gabddf3ac30aac3f22f8c53b7517e6eb35.html#gabddf3ac30aac3f22f8c53b7517e6eb35">thread_sleep_ms</a>(<span class="keywordtype">int</span> ms);</div>
<div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;</div>
<div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;<span class="keywordtype">int</span> <a class="code" href="a00121_ga76839139180a3f0d0b017a5f39801936.html#ga76839139180a3f0d0b017a5f39801936">thread_set_tls_data</a>(<a class="code" href="a00037.html">kthread_runner_t</a>* runner, <span class="keywordtype">void</span>* data);</div>
<div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;</div>
<div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;<span class="keywordtype">void</span>* <a class="code" href="a00121_gaf5bb2dd001c42fdbdcdcb2048f76ae89.html#gaf5bb2dd001c42fdbdcdcb2048f76ae89">thread_get_tls_data</a>(<a class="code" href="a00037.html">kthread_runner_t</a>* runner);</div>
<div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;</div>
<div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;<span class="keyword">extern</span> <a class="code" href="a00056_a0d043bbb6b8db19fea54ab9271d352b6.html#a0d043bbb6b8db19fea54ab9271d352b6">atomic_counter_t</a> <a class="code" href="a00121_gade4f41f1cd519f2719b5114ce7801232.html#gade4f41f1cd519f2719b5114ce7801232">atomic_counter_inc</a>(<a class="code" href="a00056_a0d043bbb6b8db19fea54ab9271d352b6.html#a0d043bbb6b8db19fea54ab9271d352b6">atomic_counter_t</a>* counter);</div>
<div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;</div>
<div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;<span class="keyword">extern</span> <a class="code" href="a00056_a0d043bbb6b8db19fea54ab9271d352b6.html#a0d043bbb6b8db19fea54ab9271d352b6">atomic_counter_t</a> <a class="code" href="a00121_gafc2df03d75cf9168b72e8c5e11953437.html#gafc2df03d75cf9168b72e8c5e11953437">atomic_counter_dec</a>(<a class="code" href="a00056_a0d043bbb6b8db19fea54ab9271d352b6.html#a0d043bbb6b8db19fea54ab9271d352b6">atomic_counter_t</a>* counter);</div>
<div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;</div>
<div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="a00121_ga141897cac9743394a99ff7780daa6a80.html#ga141897cac9743394a99ff7780daa6a80">atomic_counter_zero</a>(<a class="code" href="a00056_a0d043bbb6b8db19fea54ab9271d352b6.html#a0d043bbb6b8db19fea54ab9271d352b6">atomic_counter_t</a>* counter);</div>
<div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;</div>
<div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* THREAD_API_H */</span><span class="preprocessor"></span></div>
<div class="ttc" id="a00121_ga141897cac9743394a99ff7780daa6a80_html_ga141897cac9743394a99ff7780daa6a80"><div class="ttname"><a href="a00121_ga141897cac9743394a99ff7780daa6a80.html#ga141897cac9743394a99ff7780daa6a80">atomic_counter_zero</a></div><div class="ttdeci">int atomic_counter_zero(atomic_counter_t *counter)</div><div class="ttdoc">原子操作 - 是否为零 </div><div class="ttdef"><b>Definition:</b> misc.c:489</div></div>
<div class="ttc" id="a00056_ad0ada5642d10ce71bdd90816182f9b79_html_ad0ada5642d10ce71bdd90816182f9b79"><div class="ttname"><a href="a00056_ad0ada5642d10ce71bdd90816182f9b79.html#ad0ada5642d10ce71bdd90816182f9b79">thread_id_t</a></div><div class="ttdeci">#define thread_id_t</div><div class="ttdef"><b>Definition:</b> config.h:87</div></div>
<div class="ttc" id="a00121_ga76839139180a3f0d0b017a5f39801936_html_ga76839139180a3f0d0b017a5f39801936"><div class="ttname"><a href="a00121_ga76839139180a3f0d0b017a5f39801936.html#ga76839139180a3f0d0b017a5f39801936">thread_set_tls_data</a></div><div class="ttdeci">int thread_set_tls_data(kthread_runner_t *runner, void *data)</div><div class="ttdoc">设置线程本地存储 </div><div class="ttdef"><b>Definition:</b> misc.c:902</div></div>
<div class="ttc" id="a00056_html"><div class="ttname"><a href="a00056.html">config.h</a></div></div>
<div class="ttc" id="a00121_ga3a56e5d1203f6697a6579202919aa048_html_ga3a56e5d1203f6697a6579202919aa048"><div class="ttname"><a href="a00121_ga3a56e5d1203f6697a6579202919aa048.html#ga3a56e5d1203f6697a6579202919aa048">thread_runner_check_start</a></div><div class="ttdeci">int thread_runner_check_start(kthread_runner_t *runner)</div><div class="ttdoc">检查线程是否正在运行 </div><div class="ttdef"><b>Definition:</b> misc.c:876</div></div>
<div class="ttc" id="a00121_ga943c1e0bc78abe3d7faae24ae3670d9a_html_ga943c1e0bc78abe3d7faae24ae3670d9a"><div class="ttname"><a href="a00121_ga943c1e0bc78abe3d7faae24ae3670d9a.html#ga943c1e0bc78abe3d7faae24ae3670d9a">thread_runner_start_timer_loop</a></div><div class="ttdeci">int thread_runner_start_timer_loop(kthread_runner_t *runner, ktimer_loop_t *timer_loop, int stack_size)</div><div class="ttdoc">在线程内运行timer_loop_run() </div><div class="ttdef"><b>Definition:</b> misc.c:747</div></div>
<div class="ttc" id="a00121_gafc2df03d75cf9168b72e8c5e11953437_html_gafc2df03d75cf9168b72e8c5e11953437"><div class="ttname"><a href="a00121_gafc2df03d75cf9168b72e8c5e11953437.html#gafc2df03d75cf9168b72e8c5e11953437">atomic_counter_dec</a></div><div class="ttdeci">atomic_counter_t atomic_counter_dec(atomic_counter_t *counter)</div><div class="ttdoc">原子操作 - 递减 </div><div class="ttdef"><b>Definition:</b> misc.c:481</div></div>
<div class="ttc" id="a00121_gade4f41f1cd519f2719b5114ce7801232_html_gade4f41f1cd519f2719b5114ce7801232"><div class="ttname"><a href="a00121_gade4f41f1cd519f2719b5114ce7801232.html#gade4f41f1cd519f2719b5114ce7801232">atomic_counter_inc</a></div><div class="ttdeci">atomic_counter_t atomic_counter_inc(atomic_counter_t *counter)</div><div class="ttdoc">原子操作 - 递增 </div><div class="ttdef"><b>Definition:</b> misc.c:473</div></div>
<div class="ttc" id="a00121_gaecf10907eee00ec0e807271c906a6645_html_gaecf10907eee00ec0e807271c906a6645"><div class="ttname"><a href="a00121_gaecf10907eee00ec0e807271c906a6645.html#gaecf10907eee00ec0e807271c906a6645">thread_get_self_id</a></div><div class="ttdeci">thread_id_t thread_get_self_id()</div><div class="ttdoc">取得线程ID </div><div class="ttdef"><b>Definition:</b> misc.c:886</div></div>
<div class="ttc" id="a00121_gabddf3ac30aac3f22f8c53b7517e6eb35_html_gabddf3ac30aac3f22f8c53b7517e6eb35"><div class="ttname"><a href="a00121_gabddf3ac30aac3f22f8c53b7517e6eb35.html#gabddf3ac30aac3f22f8c53b7517e6eb35">thread_sleep_ms</a></div><div class="ttdeci">void thread_sleep_ms(int ms)</div><div class="ttdoc">睡眠 </div><div class="ttdef"><b>Definition:</b> misc.c:894</div></div>
<div class="ttc" id="a00121_gad9d9269c695d6bd683c856479d525eb7_html_gad9d9269c695d6bd683c856479d525eb7"><div class="ttname"><a href="a00121_gad9d9269c695d6bd683c856479d525eb7.html#gad9d9269c695d6bd683c856479d525eb7">thread_runner_join</a></div><div class="ttdeci">void thread_runner_join(kthread_runner_t *runner)</div><div class="ttdoc">等待线程终止 </div><div class="ttdef"><b>Definition:</b> misc.c:850</div></div>
<div class="ttc" id="a00121_ga2126b5da850ec506d0909eb81f9a50dc_html_ga2126b5da850ec506d0909eb81f9a50dc"><div class="ttname"><a href="a00121_ga2126b5da850ec506d0909eb81f9a50dc.html#ga2126b5da850ec506d0909eb81f9a50dc">thread_runner_get_params</a></div><div class="ttdeci">void * thread_runner_get_params(kthread_runner_t *runner)</div><div class="ttdoc">取得线程运行参数，thread_runner_create()第二个参数 </div><div class="ttdef"><b>Definition:</b> misc.c:881</div></div>
<div class="ttc" id="a00056_a0d043bbb6b8db19fea54ab9271d352b6_html_a0d043bbb6b8db19fea54ab9271d352b6"><div class="ttname"><a href="a00056_a0d043bbb6b8db19fea54ab9271d352b6.html#a0d043bbb6b8db19fea54ab9271d352b6">atomic_counter_t</a></div><div class="ttdeci">#define atomic_counter_t</div><div class="ttdef"><b>Definition:</b> config.h:90</div></div>
<div class="ttc" id="a00121_ga4328cb11f2446f4da89374a1ae8a2f8e_html_ga4328cb11f2446f4da89374a1ae8a2f8e"><div class="ttname"><a href="a00121_ga4328cb11f2446f4da89374a1ae8a2f8e.html#ga4328cb11f2446f4da89374a1ae8a2f8e">thread_runner_start_loop</a></div><div class="ttdeci">int thread_runner_start_loop(kthread_runner_t *runner, kloop_t *loop, int stack_size)</div><div class="ttdoc">在线程内运行knet_loop_run() </div><div class="ttdef"><b>Definition:</b> misc.c:712</div></div>
<div class="ttc" id="a00121_gac8644b2d2ca5580e0cac7378154ae2e0_html_gac8644b2d2ca5580e0cac7378154ae2e0"><div class="ttname"><a href="a00121_gac8644b2d2ca5580e0cac7378154ae2e0.html#gac8644b2d2ca5580e0cac7378154ae2e0">thread_runner_stop</a></div><div class="ttdeci">void thread_runner_stop(kthread_runner_t *runner)</div><div class="ttdoc">停止线程 </div><div class="ttdef"><b>Definition:</b> misc.c:840</div></div>
<div class="ttc" id="a00121_gae125061eb96b154766c0a414eb74065c_html_gae125061eb96b154766c0a414eb74065c"><div class="ttname"><a href="a00121_gae125061eb96b154766c0a414eb74065c.html#gae125061eb96b154766c0a414eb74065c">thread_runner_start</a></div><div class="ttdeci">int thread_runner_start(kthread_runner_t *runner, int stack_size)</div><div class="ttdoc">启动线程 </div><div class="ttdef"><b>Definition:</b> misc.c:676</div></div>
<div class="ttc" id="a00037_html"><div class="ttname"><a href="a00037.html">_thread_runner_t</a></div><div class="ttdef"><b>Definition:</b> misc.c:38</div></div>
<div class="ttc" id="a00025_html"><div class="ttname"><a href="a00025.html">_ktimer_loop_t</a></div><div class="ttdef"><b>Definition:</b> timer.c:44</div></div>
<div class="ttc" id="a00121_gaf5bb2dd001c42fdbdcdcb2048f76ae89_html_gaf5bb2dd001c42fdbdcdcb2048f76ae89"><div class="ttname"><a href="a00121_gaf5bb2dd001c42fdbdcdcb2048f76ae89.html#gaf5bb2dd001c42fdbdcdcb2048f76ae89">thread_get_tls_data</a></div><div class="ttdeci">void * thread_get_tls_data(kthread_runner_t *runner)</div><div class="ttdoc">取得线程本地存储 </div><div class="ttdef"><b>Definition:</b> misc.c:932</div></div>
<div class="ttc" id="a00121_gacc8838f250e5f685580a508e93d3f636_html_gacc8838f250e5f685580a508e93d3f636"><div class="ttname"><a href="a00121_gacc8838f250e5f685580a508e93d3f636.html#gacc8838f250e5f685580a508e93d3f636">thread_runner_create</a></div><div class="ttdeci">kthread_runner_t * thread_runner_create(knet_thread_func_t func, void *params)</div><div class="ttdoc">创建一个线程 </div><div class="ttdef"><b>Definition:</b> misc.c:553</div></div>
<div class="ttc" id="a00033_html"><div class="ttname"><a href="a00033.html">_loop_t</a></div><div class="ttdef"><b>Definition:</b> loop.c:36</div></div>
<div class="ttc" id="a00056_a8741dac4a9f8d97603eb3a30a3473b13_html_a8741dac4a9f8d97603eb3a30a3473b13"><div class="ttname"><a href="a00056_a8741dac4a9f8d97603eb3a30a3473b13.html#a8741dac4a9f8d97603eb3a30a3473b13">knet_thread_func_t</a></div><div class="ttdeci">void(* knet_thread_func_t)(kthread_runner_t *)</div><div class="ttdef"><b>Definition:</b> config.h:295</div></div>
<div class="ttc" id="a00121_ga1f1e994ba4c42e91e4d4b120aa8eb970_html_ga1f1e994ba4c42e91e4d4b120aa8eb970"><div class="ttname"><a href="a00121_ga1f1e994ba4c42e91e4d4b120aa8eb970.html#ga1f1e994ba4c42e91e4d4b120aa8eb970">thread_runner_get_id</a></div><div class="ttdeci">thread_id_t thread_runner_get_id(kthread_runner_t *runner)</div><div class="ttdoc">获取线程ID </div><div class="ttdef"><b>Definition:</b> misc.c:845</div></div>
<div class="ttc" id="a00121_gaa9112d70f3e5a8dcf648ce531332f66a_html_gaa9112d70f3e5a8dcf648ce531332f66a"><div class="ttname"><a href="a00121_gaa9112d70f3e5a8dcf648ce531332f66a.html#gaa9112d70f3e5a8dcf648ce531332f66a">thread_runner_destroy</a></div><div class="ttdeci">void thread_runner_destroy(kthread_runner_t *runner)</div><div class="ttdoc">销毁一个线程 </div><div class="ttdef"><b>Definition:</b> misc.c:563</div></div>
<div class="ttc" id="a00121_ga80fabbe64d1fc33e81053e51f69772d2_html_ga80fabbe64d1fc33e81053e51f69772d2"><div class="ttname"><a href="a00121_ga80fabbe64d1fc33e81053e51f69772d2.html#ga80fabbe64d1fc33e81053e51f69772d2">thread_runner_start_multi_loop_varg</a></div><div class="ttdeci">int thread_runner_start_multi_loop_varg(kthread_runner_t *runner, int stack_size, const char *format,...)</div><div class="ttdoc">在线程内启动多个kloop_t或ktimer_loop_t </div><div class="ttdef"><b>Definition:</b> misc.c:782</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
生成于 2015年 七月 27日 星期一 14:33:19 , 为 knet使用  &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.9.1
</small></address>
</body>
</html>
